﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPNETPerformance.App_BusinessLogic.BasePages;
using ASPNETPerformance.App_BusinessLogic.StaticPage;

namespace ASPNETPerformance.UserControls {
    public partial class RequestCacheModel1 : BaseUserControl {

        public ProductHelperClass product;

        protected void Page_Load( object sender, EventArgs e ) {
            if ( !this.Page.IsPostBack ) {
                product = ( ProductHelperClass )Global.RequestCache.Get( "RequestCache" );

                if ( product != null ) {
                    this.lPrice.Text = product.Price.ToString();
                    this.lPriceOld.Text = product.PriceOld.ToString();
                    this.lSKU.Text = product.SKU;
                    this.lStock.Text = product.Stock.ToString();
                    this.lTitle.Text = product.Title;
                }
            }
        }
    }
}